<?

include_once $_SERVER['DOCUMENT_ROOT'].$dir."/conn.php";

$sbs = "select * from job_banners_m";
$rsbs = mysql_query($sbs) or die(mysql_error());
$abs = mysql_fetch_array($rsbs);
$bs = $abs[0];

if ($bs == 1)
{

	$q1 = "select * from job_banners_t order by rand() limit 0,1";
	$r1 = mysql_query($q1) or die (mysql_error());

	$asb = mysql_fetch_array($r1);

	echo "<a href=\"$asb[burl]\" target=_blank alt=\"$asb[alt]\"><img src=\"http://$_SERVER[HTTP_HOST]$dir/banners/$asb[fn]\" border=0></a>";		

}
elseif($bs == 2)
{

	$bc = "select * from job_link_source order by rand() limit 0,1";
	$rbc = mysql_query($bc) or die(mysql_error());

	if (mysql_num_rows($rbc) > 0)
	{
		$asl = mysql_fetch_array($rbc);

		$link_code = $asl[link_code];

		echo $link_code;
	}
}


?>